import request from '@/utils/request'

//  查询隐患类别子类列表(分页)
export function getDefectTypeChildList(params) {
  return request({
    url: '/business/defect/defectTypeChild/list',
    method: 'get',
    params
  })
}
//  获取隐患子类详情
export function getDefectTypeChildInfoById(id){
  return request({
    url: `/business/defect/defectTypeChild/${id}`,
    method: 'get',
  })
}
//  增加隐患子类
export function addDefectTypeChild(data) {
  return request({
    url: '/business/defect/defectTypeChild/add',
    method: 'post',
    data
  })
}

//  更新隐患子类
export function updateDefectTypeChild(data) {
  return request({
    url:'/business/defect/defectTypeChild/update',
    method:'put',
    data
  })
}

//  删除隐患子类
export function delDefectTypeChild(ids) {
  return request({
    url:`/business/defect/defectTypeChild/${ids}`,
    method:'delete',
  })
}
